home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Dev / Oberon / source / amiga / Console.mod < prev    next >
Text File  |  1995-06-29  |  4KB  |  159 lines

  1. (***************************************************************************
  2.  
  3.      $RCSfile: Console.mod $
  4.   Description: Interface to console.device
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.8 $
  8.       $Author: fjc $
  9.         $Date: 1995/06/04 23:13:14 $
  10.  
  11.   Includes Release 40.15
  12.  
  13.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  14.       All Rights Reserved
  15.  
  16.   Oberon-A interface Copyright © 1994-1995, Frank Copeland.
  17.   This file is part of the Oberon-A Interface.
  18.   See Oberon-A.doc for conditions of use and distribution.
  19.  
  20. ***************************************************************************)
  21.  
  22. <* STANDARD- *>
  23.  
  24. MODULE [2] Console;
  25.  
  26. IMPORT
  27.   SYS := SYSTEM, e := Exec, ie := InputEvent, km := KeyMap, u := Utility;
  28.  
  29.  
  30. (*
  31. **      $VER: console.h 36.11 (7.11.90)
  32. **
  33. **      Console device command definitions
  34. *)
  35.  
  36. CONST
  37.  
  38. (****** Console commands ******)
  39.   askKeyMap            * = e.nonstd+0;
  40.   setKeyMap            * = e.nonstd+1;
  41.   askDefaultKeyMap     * = e.nonstd+2;
  42.   setDefaultKeyMap     * = e.nonstd+3;
  43.  
  44. (****** SGR parameters ******)
  45.  
  46.   primary     * = 0;
  47.   bold        * = 1;
  48.   italic      * = 3;
  49.   underscore  * = 4;
  50.   negative    * = 7;
  51.  
  52.   normal      * = 22;      (* default foreground color, not bold *)
  53.   notItalic   * = 23;
  54.   notUnderscore * = 24;
  55.   positive    * = 27;
  56.  
  57. (* these names refer to the ANSI standard, not the implementation *)
  58.   black       * = 30;
  59.   red         * = 31;
  60.   green       * = 32;
  61.   yellow      * = 33;
  62.   blue        * = 34;
  63.   magenta     * = 35;
  64.   cyan        * = 36;
  65.   white       * = 37;
  66.   default     * = 39;
  67.  
  68.   blackBg     * = 40;
  69.   redBg       * = 41;
  70.   greenBg     * = 42;
  71.   yellowBg    * = 43;
  72.   blueBg      * = 44;
  73.   magentaBg   * = 45;
  74.   cyanBg      * = 46;
  75.   whiteBg     * = 47;
  76.   defaultBg   * = 49;
  77.  
  78. (* these names refer to the implementation, they are the preferred *)
  79. (* names for use with the Amiga console device. *)
  80.   clr0        * = 30;
  81.   clr1        * = 31;
  82.   clr2        * = 32;
  83.   clr3        * = 33;
  84.   clr4        * = 34;
  85.   clr5        * = 35;
  86.   clr6        * = 36;
  87.   clr7        * = 37;
  88.  
  89.   clr0Bg      * = 40;
  90.   clr1Bg      * = 41;
  91.   clr2Bg      * = 42;
  92.   clr3Bg      * = 43;
  93.   clr4Bg      * = 44;
  94.   clr5Bg      * = 45;
  95.   clr6Bg      * = 46;
  96.   clr7Bg      * = 47;
  97.  
  98.  
  99. (****** DSR parameters ******)
  100.  
  101.   dsrCpr         * = 6;
  102.  
  103. (****** CTC parameters ******)
  104.   ctcHSetTab     * = 0;
  105.   ctcHClrTab     * = 2;
  106.   ctcHClrTabsAll * = 5;
  107.  
  108. (****** TBC parameters ******)
  109.   tbcHClrTab     * = 0;
  110.   tbcHClrTabsAll * = 3;
  111.  
  112. (****** SM and RM parameters ******)
  113.   mLNM   * = 20;      (* linefeed newline mode *)
  114.   mASM   * = ">1";    (* auto scroll mode *)
  115.   mAWM   * = "?7";    (* auto wrap mode *)
  116.  
  117.  
  118. (**-- Device base variable----------------------------------------------*)
  119.  
  120.  
  121. CONST
  122.  
  123.   consoleName * = "console.device";
  124.  
  125. VAR
  126.  
  127.   base * : e.DevicePtr;
  128.  
  129. (**-- Device functions -------------------------------------------------*)
  130.  
  131. (*
  132. **      $VER: console_protos.h 36.6 (7.11.90)
  133. *)
  134.  
  135. PROCEDURE CDInputHandler* [base,-42]
  136.   ( events        [8] : ie.InputEventDummyPtr;
  137.     consoleDevice [9] : e.LibraryBasePtr )
  138.   : ie.InputEventDummyPtr;
  139. PROCEDURE RawKeyConvert* [base,-48]
  140.   ( events     [8] : ie.InputEventDummyPtr;
  141.     VAR buffer [9] : ARRAY OF SYS.BYTE;
  142.     length     [1] : LONGINT;
  143.     keyMap    [10] : km.KeyMapPtr )
  144.   : LONGINT;
  145.  
  146. (*--- functions in V36 or higher (Release 2.0) ---*)
  147.  
  148. PROCEDURE GetConSnip * [base,-54] ()
  149.   : LONGINT;
  150. PROCEDURE SetConSnip * [base,-60]
  151.   ( snip [8] : LONGINT);
  152. PROCEDURE AddConSnipHook * [base,-66]
  153.   ( hook [8] : u.HookBasePtr );
  154. PROCEDURE RemConSnipHook * [base,-72]
  155.   ( hook [8] : u.HookBasePtr );
  156.  
  157. BEGIN base := NIL
  158. END Console.
  159.